﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />
<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>
  
  <%@ include file="/WEB-INF/include/menu.jsp"%>

  <div class="container main-content">

    <div class="panel panel-default x-panel x-panel-layout">

      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host}/online-rounds">课程管理</a></li>
          <li class="active">动作属性</li>
        </ol>
      </div>

      <div class="panel-body">

        <div class="col-xs-2 x-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>

        <div class="col-xs-10 x-panel-layout-right">

          <div class="x-breadcrumb-wrapper">
            <div class="x-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire" title="动作属性"></i>&nbsp;&nbsp;<span>动作属性&nbsp;-&nbsp;分类列表</span></h2>
          </div>
          <div class="row">
            <div class="col-xs-6" style="padding-left: 0px; padding-right: 0px;">
                <div class="col-xs-12 product-category">
                  <div class="panel panel-default denver-panel denver-panel-layout">
                    <div class="panel-heading">
                      <span>动作类别</span>
                    </div>
                    <ul class="list-group">
                       <c:forEach var="category" items="${movementCategories}">
                        <li class="list-group-item">
                          <span>${category.name}</span>
                          <c:if test="${currentPrincipal.coursewareManager}">
                            <a href="${ctx.host}/movement-attributes/${category.id}/category-delete" data-target="#delete" data-toggle="modal" class="pull-right"><i class="glyphicon glyphicon-remove"></i></a>
                            <a href="${ctx.host}/movement-attributes/${category.id}/category-edit" data-target="#edit" data-toggle="modal" class="pull-right" style="right: 30px;"><i class="glyphicon glyphicon-edit"></i></a>
                          </c:if>
                        </li>
                       </c:forEach>
                    </ul>
                    <c:if test="${currentPrincipal.coursewareManager}">
                      <div class="panel-footer text-center">
                        <a href="${ctx.host}/movement-attributes/category-create" class="hover-no-text-decoration" data-target="#create" data-toggle="modal"><i class="glyphicon glyphicon-plus"></i>&nbsp;&nbsp;添加新分类</a>
                      </div>
                    </c:if>
                  </div>
                </div>
            </div>
            
            <div class="col-xs-6" style="padding-left: 0px; padding-right: 0px;">
             <div class="col-xs-12 product-category">
                  <div class="panel panel-default denver-panel denver-panel-layout">
                    <div class="panel-heading">
                      <span>器材</span>
                    </div>
                    <ul class="list-group">
                        <c:forEach var="equipment" items="${MovementEquipments}">
                        <li class="list-group-item">
                          <span>${equipment.name}</span>
                          <c:if test="${currentPrincipal.coursewareManager}">
                            <a href="${ctx.host}/movement-attributes/${equipment.id}/equipment-delete" data-target="#delete" data-toggle="modal" class="pull-right"><i class="glyphicon glyphicon-remove"></i></a>
                            <a href="${ctx.host}/movement-attributes/${equipment.id}/equipment-edit" data-target="#edit" data-toggle="modal" class="pull-right" style="right: 30px;"><i class="glyphicon glyphicon-edit"></i></a>
                          </c:if>
                        </li>
                       </c:forEach>
                    </ul>
                    <c:if test="${currentPrincipal.coursewareManager}">
                      <div class="panel-footer text-center">
                        <a href="${ctx.host}/movement-attributes/equipment-create" class="hover-no-text-decoration" data-target="#create" data-toggle="modal"><i class="glyphicon glyphicon-plus"></i>&nbsp;&nbsp;添加新器材</a>
                      </div>
                    </c:if>
                  </div>
                </div>
            </div>
            
          </div>

        </div>
      </div>
    </div>
  </div>
  
  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/courseware/movement/attribute/attribute-index.js">
    <script type="text/javascript">
      require(['page/courseware/movement/attribute/attribute-index'],function(page){
          page.init();
      })
    </script>
  </d:resource>
</body>

</html>
